<?php
include '../conn.php';
include 'a-cookie.php';
if($_SESSION["a-rank"]==1)
{
    die("权限不够，不能进入");
}
?>

<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页-管理员</title>
    <link rel="stylesheet" type="text/css" href="../css/htmleaf-demo.css">
    <link rel="stylesheet" type="text/css" href="../css/nav.css">
    <link rel="stylesheet" type="text/css" href="../fonts/iconfont.css">

    <link rel="stylesheet" href="../css/bootstrap-theme.css"/>

    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <link rel="stylesheet" href="../css/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="../css/bootstrap.css"/>
    <script type="text/javascript" src="../js/bootstrap3.0.3.min.js"></script>


    <link rel="stylesheet" type="text/css" href="../layer/theme/default/layer.css">
    <link rel="stylesheet" type="type/css" href="../layer/mobile/need/layer.css">

    <link rel="stylesheet" type="text/css" href="../css/style.css">

    <style>
        a {
            color: #693118;
        }

        a:hover {
            color: #180b05;
        }

    </style>
    <script>

        $(function () {
            $("[data-toggle='popover']").popover();
        });

    </script>

</head>

<body class="bodycolor">

<nav class="navbar navbar-default navbar-fixed-top" style="clear: left;">
    <div class="container">
        <div class="navbar-right navfont" id="navbar-collapse">
            <p>华软网络技术系毕业管理系统</p>
        </div>
        <a href="a-cookie.php?cookie=out" id="out">退出</a>
    </div>

</nav>

<div class="nav topx navbackground-a" id="nav">
    <div>

        <div style="border-bottom:1px solid rgba(255,255,255,.1)"><img src="../images/mini.png"></div>
    </div>
    <ul>
        <li class="nav-item">
            <a href="a-index.php"><i class="my-icon nav-icon icon_2"></i><span>首页</span><i class="my-icon nav-more"></i></a>

        </li>
        <li class="nav-item">
            <a href="a-newsManage.php"><i class="my-icon nav-icon icon_5"></i><span>开放/新闻管理</span><i
                    class="my-icon nav-more"></i></a>
        </li>


        <li class="nav-item">
            <a href="a-all.php"><i class="my-icon nav-icon icon_6"></i><span>答辩汇总</span><i class="my-icon nav-more"></i></a>

        </li>
        <li class="nav-item">
            <a href="#"><i class="my-icon nav-icon icon_3"></i><span>答辩分组</span><i class="my-icon nav-more"></i></a>
            <ul>
                <li>
                    <a href="a-denfenAsign.php"><span>小组分配</span></a>
                </li>
                <li>
                    <a href="a-denfenInterAsign.php"><span>组内分配</span></a>
                </li>
            </ul>
        </li>
        <li class="nav-item">
            <a href="a-infromationmange.php"><i class="my-icon nav-icon icon_5"></i><span>资料管理</span><i
                    class="my-icon nav-more"></i></a>
        </li>
    </ul>
</div>

<div class="indexborder">


    <center>
        <div class="indexdiv1 panel panel-default auto" align="center">
            <div class="panel" style="border:1px solid #807345"><!--panel-warning-->
                <div class="panel-heading" style="background-color: #807345;">
                    <h3 class="panel-title ">教师资料表</h3>
                </div>
                <div class="panel-body">
                    <!--<div class="table-responsive">-->
                    <table class="table">
                        <thead>
                        <tr>
                            <th>教师工号</th>
                            <th>教师姓名</th>
                            <th>操作</th>
                        </tr>
                        </thead>

                        <?
                        $tsql = "select * from teacher";
                        $tresault = $conn->query($tsql);
                        $i = 1;
                        while ($trow = $tresault->fetch_array()) {
                            if ($i % 2 == 0) {
                                ?>
                                <tr class="warning">
                            <?
                            } else { ?>
                                <tr>
                            <? }
                            $i++; ?>
                            <td><?= $trow['TeacherId'] ?></td>
                            <td>
                                <a href="#" title="个人信息" data-container="body"
                                   data-toggle="popover" data-placement="right"
                                   data-trigger="hover "
                                   data-content="<img src='../img/教师头像.gif' width='30%' style='float:left;margin-right:5%'>性别：<?= $trow['Sex'] ?><br>手机：<?= $trow['Tel'] ?><br>系别：<?= $trow['CurrSubject'] ?>"
                                   data-html="true"
                                   onclick="open_t('<?=$trow['TeacherId']?>')"><?= $trow['TeacherName'] ?></a>
                            </td>
                            <td>
                                <input type="button" value="删除"
                                       style="background-color:#463c19 ;color:white;max-width: 50px;">
                            </td>

                            </tr>
                        <? } ?>

                    </table>

                </div>
                <!--</div>-->
            </div>
            <div>
                <input type="text" name="tname" placeholder="请输入教师工号" id="search"/>
                <button id="searchbtn2" class="btn  btn-xs" style="background-color:#463c19 ;color:white">添加</button>
            </div>


        </div>

    </center>


</div>


<div class="indexborder">


    <center>
        <div class="indexdiv1 panel panel-default auto" align="center">
            <div class="panel" style="border:1px solid #807345"><!--panel-warning-->
                <div class="panel-heading" style="background-color: #807345;">
                    <h3 class="panel-title ">学生资料表</h3>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>学号</th>
                                <th>姓名</th>
                            </tr>
                            </thead>
                            <?
                            $ssql = "select * from student";
                            $sresault = $conn->query($ssql);
                            $i = 1;
                            while ($srow = $sresault->fetch_array()) {
                                if ($i % 2 == 0) {
                                    ?>
                                    <tr class="warning">
                                <?
                                } else { ?>
                                    <tr>
                                <? }
                                $i++; ?>
                                <td><?= $srow['StudentId'] ?></td>
                                <td><a href="#" title="个人信息" data-container="body" data-toggle="popover"
                                       data-placement="right" data-trigger="hover "
                                       data-content="<img src='../img/学生头像.png' width='25%' style='float:left;margin-right:5%'>性别：<?= $srow['Sex'] ?><br>手机：<?= $srow['Tel'] ?><br>系别：<?= $srow['Major'] ?>"
                                       data-html="true" onclick="open_s(<?=$srow['StudentId'] ?>)"><?= $srow['StudentName'] ?></a></td>
                                <td>
                                    <input type="button" value="删除" style="background-color:#463c19 ;color:white">
                                </td>
                                </tr>
                            <? } ?>

                        </table>

                    </div>
                </div>
            </div>
            <div>
                <input type="text" name="tname" placeholder="请输入学生学号" id="search"/>
                <button id="searchbtn2" class="btn  btn-xs" style="background-color:#463c19 ;color:white">添加</button>
            </div>


        </div>
    </center>


</div>

<!--<footer class="indexfooter container-fluid  bottom">
    <p class="footer-p" align="center">地址：广东省广州市从化区经济开发区高技术产业园广从南路548号 | 电话：020－87818918 邮编：510990 | 网站公安备案编号：4401840100050 粤ICP备：05085382号 站长统计</p>
</footer>-->


<script type="text/javascript">  //弹窗实现
    function open_t(id) {
        var path = "a-teacherchange.php?Id=" + id;
                alert(path);

        layer.open({
            type: 1,
            area: ['80%', '80%'],
            shadeClose: true, //点击遮罩关闭
            content: "<iframe src=''  width='98%' height='94%' name=main frameborder= scrolling=NO id='testFrame'></iframe>"
        });
        var t = document.getElementById("testFrame");
        t.src = path;
    }
    function open_s(id){
        var path = "a-studentchange.php?Id=" + id;
        alert(path);

        layer.open({
            type: 1,
            area: ['80%', '80%'],
            shadeClose: true, //点击遮罩关闭
            content: "<iframe src=''  width='98%' height='94%' name=main frameborder= scrolling=NO id='testFrame'></iframe>"
        });
        var t = document.getElementById("testFrame");
        t.src = path;
    }
</script>
<script type="text/javascript" src="../js/nav.js"></script>
<script type="text/javascript" src="../layer/layer.js"></script>


</body>

</html>